import {
	OddGate
} from '../utils/OddGateEncryption.js'
import {
	formatDate
} from '../utils/formatTime.js'
let Base64 = require('js-base64').Base64
export const ParameterCalcPackage = (method, param) => {
	var dataParam = '';
	var secret='R1dZSzAx'
	var getData = {
		'method': method,
		'timestamp': formatDate(new Date(), "YYYY-mm-dd HH:MM:SS"),
		'format': 'json',
		'app_key': 'GWYK01',
		'v': '1.0',
		'sign_method': 'md5',
		'customerId': 'GWYK'
	}
	param.time = Date.parse(new Date())
	getData.sign = OddGate(getData, JSON.stringify(param), secret)
	dataParam = Base64.encodeURL(JSON.stringify(param))
	return {getData, dataParam}
}
